/**
 * Created by oneminute on 8/12/14.
 */

var lz = require("../lib/utils/modules")();

exports.post = function (_req, _res, _opts, _callback) {
    var app = {};
    app.device = _opts.device;
    app.version = _opts.version;
    app.file = _opts.app;
    app.comment = _opts.comment;
    lz.Logger.info('/uploadapp: 用户请求发布新app: ', app);
    lz.Utils.saveApp(app, function () {
        _callback(null, _opts.user);
    });
};
